TypeScript Programming Language by Publishing TypeScript

TypeScript Programming Language by Publishing TypeScript
Author: Publishing, TypeScript [Publishing, TypeScript]
Language: eng
Format: epub
Published: 2019-11-14

Parameter Details:

radix − An integer between 2 and 36 specifying the base to use for representing numeric values.

Return Value:

Returns a string representing the specified Number object.

Example:

var num = new Number ( 10 );

console. log( num. toString());

console. log( num. toString( 2 ));

console. log( num. toString( 8 ));

On compiling, it will generate the same code in JavaScript.

The code will produce the following output −

10

1010

12


valueOf():

This method returns the primitive value of the specified number object.

Syntax:

number.valueOf()